{
 "cells": [
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "酶活性预测实战task：\n",
    "1、基于T-R-train.csv数据，建立线性回归模型，计算其在T-R-test.csv数据上的r2分数，可视化模型预测结果 \n",
    "2、加入多项式特征（2次、5次），建立回归模型\n",
    "3、计算多项式回归模型对测试数据进行预测的r2分数，判断哪个模型预测更准确\n",
    "4、可视化多项式回归模型数据预测结果，判断哪个模型预测更准确"
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "@Author  : Flare Zhao\n",
    "@Email: 454209979@qq.com\n",
    "@QQ讨论群：530533630  申请加群的验证信息为订单号（粘贴号码数字即可）\n",
    "@如果觉得课程不错的话，欢迎推荐朋友学习，发送朋友截图（含报名日期）和订单号至老师邮箱，返还100元学费"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>T</th>\n",
       "      <th>rate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>46.53</td>\n",
       "      <td>2.49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>48.14</td>\n",
       "      <td>2.56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>50.15</td>\n",
       "      <td>2.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>51.36</td>\n",
       "      <td>2.69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>52.57</td>\n",
       "      <td>2.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>54.18</td>\n",
       "      <td>2.80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>56.19</td>\n",
       "      <td>2.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>58.58</td>\n",
       "      <td>2.92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>61.37</td>\n",
       "      <td>2.96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>63.34</td>\n",
       "      <td>2.95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>65.31</td>\n",
       "      <td>2.91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>66.47</td>\n",
       "      <td>2.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>68.03</td>\n",
       "      <td>2.78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>69.97</td>\n",
       "      <td>2.69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>71.13</td>\n",
       "      <td>2.61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>71.89</td>\n",
       "      <td>2.54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>73.05</td>\n",
       "      <td>2.45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>74.21</td>\n",
       "      <td>2.39</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        T  rate\n",
       "0   46.53  2.49\n",
       "1   48.14  2.56\n",
       "2   50.15  2.63\n",
       "3   51.36  2.69\n",
       "4   52.57  2.74\n",
       "5   54.18  2.80\n",
       "6   56.19  2.88\n",
       "7   58.58  2.92\n",
       "8   61.37  2.96\n",
       "9   63.34  2.95\n",
       "10  65.31  2.91\n",
       "11  66.47  2.85\n",
       "12  68.03  2.78\n",
       "13  69.97  2.69\n",
       "14  71.13  2.61\n",
       "15  71.89  2.54\n",
       "16  73.05  2.45\n",
       "17  74.21  2.39"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#load the data\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "data_train = pd.read_csv('T-R-train.csv')\n",
    "data_train\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "#define X_train and y_train\n",
    "X_train = data_train.loc[:,'T']\n",
    "y_train = data_train.loc[:,'rate']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUsAAAFNCAYAAACJ7k2DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAZG0lEQVR4nO3dfZBldX3n8fdHGGVgwEGdqEwYJ1Iuwooy2qIWixpJibAmonETTYkGNxndRYUqQqH84WK5G5IQ2WBMZFEUjZhSA0GXREfKRQyWoD3DwAAjxgcQBpRBw2PGh4Hv/nHPaE/b3XP64dy+t+/7VXVr7j3n1+d++1Tz4fzOw++XqkKSNLPHLHYBkjQMDEtJasGwlKQWDEtJasGwlKQWDEtJasGw1EhJ8odJrlnsOjR8DEtpGknOTvKJxa5Dg8Gw1KJLsvdi1yDtiWGpRZHktiRn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X23GSjyqaXd2kr9L8v+a5X+860tm2O7WJH8LbAIOTvLBJONJbp7Q7h3AQcBVSa5qlj00YduvTXJx8/7iJOc17f68eQLqI813X5/kVX3Yp+q3qvLlq9MXsBa4qXn/cnrzn4Te/6yvoDdk2VpgJ3BEs3wj8JGm3auAy5ufPxu4AVhOb+7nO+iF3EzbfRR44YR6ntD8uxfwZeDZzefbgCdNaPfQhPevBS5u3l/cbH+v5vOfAm9o3q8EvgXst9j73dfCvuxCqN9e3ryubz6vAJ5B71G571XVFoAkNwNfqqpKsoVe6O3y2araAexoju6OAv7TDNu9vaqunfDzv9cMQ7c38FTgcODGWf4en6mqRyb8Tr+T5E+az/vQe/xv6yy3qQFmWKrfApxTVf9nt4XJWuCnExY9OuHzo+z+tzr5Gd3aw3YfnvD5N4A/AZ5fVf/WdK33mabWid8zuc3DE94H+N2qunWa7WgJ8Jyl+uFBYP/m/QbgzUlWACRZnWS2A8a+Ksk+zSAOLwW+MYvtHkAv6O5P8mR6Q3dNVSf0hh87rLko9OoZ6tkAvD1Jmu9eN8vfR0PAI0t1rqp+1FyouQn4PPBJ4GtNtjwEvAF4ZIZNTPZ14J/odXXfW72xOO9KctietltVNyS5HriZ3og/X52w+kLg80nurqrfpDco7xX0zoveRK9rP5X3An8F3NgE5m3AK2fx+2gIOOqQhkqGYBI1LU12wyWpBY8sJakFjywlqQXDUpJaMCwlqQXDUpJaMCwlqQXDUpJa+P/eVFKkOWxUEQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#visualize the data\n",
    "%matplotlib inline\n",
    "from matplotlib import pyplot as plt\n",
    "fig1 = plt.figure(figsize=(5,5))\n",
    "plt.scatter(X_train,y_train)\n",
    "plt.title('raw data')\n",
    "plt.xlabel('temperature')\n",
    "plt.ylabel('rate')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_train = np.array(X_train).reshape(-1,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None, normalize=False)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#linear regression model prediction\n",
    "from sklearn.linear_model import  LinearRegression\n",
    "lr1 = LinearRegression()\n",
    "lr1.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "#load the test data\n",
    "data_test = pd.read_csv('T-R-test.csv')\n",
    "X_test = data_test.loc[:,'T']\n",
    "y_test = data_test.loc[:,'rate']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_test = np.array(X_test).reshape(-1,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "training r2: 0.016665703886981964\n",
      "test r2: -0.7583363437351314\n"
     ]
    }
   ],
   "source": [
    "#make prediction on the training and testing data\n",
    "y_train_predict = lr1.predict(X_train)\n",
    "y_test_predict = lr1.predict(X_test)\n",
    "from sklearn.metrics import r2_score\n",
    "r2_train = r2_score(y_train,y_train_predict)\n",
    "r2_test = r2_score(y_test,y_test_predict)\n",
    "print('training r2:',r2_train)\n",
    "print('test r2:',r2_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "#generate new data\n",
    "X_range = np.linspace(40,90,300).reshape(-1,1)\n",
    "y_range_predict = lr1.predict(X_range)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUh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OgD0K6dpzyrg4+ksPEhaPsT+2CjnI0rLXUS8nA7KPAV8HbgX+H6aKweB9wMnT/MR/T0JfJWkvP1MJPN2bpd0QdbnRsR6SeuAp0lmMXq86OU7gK9L2hERbyWZXPghkvOgT5GU86V8hmRm/Q1pWD4PXDGE/tgo59mDrKpI+hTJIMtfV7otNna49DYzy+AjSjOzDD6iNDPL4KA0M8vgoDQzy+CgNDPL4KA0M8vgoDQzy/D/ASAT3U3fI67NAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig2 = plt.figure(figsize=(5,5))\n",
    "plt.plot(X_range,y_range_predict)\n",
    "plt.scatter(X_train,y_train)\n",
    "\n",
    "plt.title('prediction data')\n",
    "plt.xlabel('temperature')\n",
    "plt.ylabel('rate')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(18, 6)\n"
     ]
    }
   ],
   "source": [
    "#多项式模型\n",
    "#generate new features\n",
    "from sklearn.preprocessing import PolynomialFeatures\n",
    "poly2 = PolynomialFeatures(degree=2)\n",
    "X_2_train = poly2.fit_transform(X_train)\n",
    "X_2_test = poly2.transform(X_test)\n",
    "poly5 = PolynomialFeatures(degree=5)\n",
    "X_5_train = poly5.fit_transform(X_train)\n",
    "X_5_test = poly5.transform(X_test)\n",
    "print(X_5_train.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "training r2_2: 0.9700515400689422\n",
      "test r2_2: 0.9963954556468684\n",
      "training r2_5: 0.9978527267187657\n",
      "test r2_5: 0.5437837627381457\n"
     ]
    }
   ],
   "source": [
    "lr2 = LinearRegression()\n",
    "lr2.fit(X_2_train,y_train)\n",
    "\n",
    "\n",
    "y_2_train_predict = lr2.predict(X_2_train)\n",
    "y_2_test_predict = lr2.predict(X_2_test)\n",
    "r2_2_train = r2_score(y_train,y_2_train_predict)\n",
    "r2_2_test = r2_score(y_test,y_2_test_predict)\n",
    "\n",
    "lr5 = LinearRegression()\n",
    "lr5.fit(X_5_train,y_train)\n",
    "\n",
    "\n",
    "y_5_train_predict = lr5.predict(X_5_train)\n",
    "y_5_test_predict = lr5.predict(X_5_test)\n",
    "r2_5_train = r2_score(y_train,y_5_train_predict)\n",
    "r2_5_test = r2_score(y_test,y_5_test_predict)\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "print('training r2_2:',r2_2_train)\n",
    "print('test r2_2:',r2_2_test)\n",
    "print('training r2_5:',r2_5_train)\n",
    "print('test r2_5:',r2_5_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_2_range = np.linspace(40,90,300).reshape(-1,1)\n",
    "X_2_range = poly2.transform(X_2_range)\n",
    "y_2_range_predict = lr2.predict(X_2_range)\n",
    "\n",
    "X_5_range = np.linspace(40,90,300).reshape(-1,1)\n",
    "X_5_range = poly5.transform(X_5_range)\n",
    "y_5_range_predict = lr5.predict(X_5_range)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUoAAAFNCAYAAABmLCa9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deXhU5fXA8e/JJCFhSwgESAIYQED2RUAURRQVRXFDLW7VWku11qWt2uqvdW2tW7Vaq61bqVaxbiAgiJRFRRDZZF8EBLKwQwKBkPX8/rgXHMJkw8zcmcn5PM88mbvMnfPOJ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edRK0UygSK/VeV+y+Uc/bta8bpbrea4B/yW2wN3AwNUda/bnE6oJFb/96m4zwG/5wKMUtW1lRzHRDjrozShsB9o4j6fBtwkIo3BuSXB4ZlfauESce7v0hwYCiyoxXGb4iS5fBFphTNdWqA4wZmmq6s7AHRZFfFMA253Z+FBRPrWsjwmzFmN0gSdqu52B2VWAFOBt4F5bl4pAK4Dyqo4REVfAx/jNG8fVWfezlwR6VrdcVV1qYgsAVbizGL0pd/ml4GpIrJVVc/CmVx4Mk4/6Aqc5nwgj+LMrL/MTZabgItqUR4T5mz2IBNRROQhnEGWp72OxdQf1vQ2xphqWI3SGGOqYTVKY4yphiVKY4yphiVKY4yphiVKY4yphiVKY4yphiVKY4ypxv8D57bRHkyy7/gAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig3 = plt.figure(figsize=(5,5))\n",
    "plt.plot(X_range,y_2_range_predict)\n",
    "plt.scatter(X_train,y_train)\n",
    "plt.scatter(X_test,y_test)\n",
    "\n",
    "plt.title('polynomial prediction result (2)')\n",
    "plt.xlabel('temperature')\n",
    "plt.ylabel('rate')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUoAAAFNCAYAAABmLCa9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deXxU5d3//9eHJJCwhX0LICqouOCGKOptXVrRurXWWqu22k29297afmsX+6vWbmqXW1u11Ru1tS61tWpRqUutSNVaUUCNIKDIHgIJS1aSkOXz++Oc4DBMMgEzy5m8n4/HPD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oP3ML7vhHAuu7zIUOBF4fTe2O5Ag5KrNbCTB6dISlROC03RNDgeAPtlJeZ4F/ic8Cw9mdvhu1keynFqUknLuvjkclFkEPA38CfhPmCt1wMVAayebiPca8HeC3dufeHDezvVmNjnZdt39LTN7A1hMcBajf8c8PRN42szK3f0kgpMLzyboB11EsDufyE8IzqxfGoblKuDM3aiPZDmdPUgixcyuJxhk+VWmyyI9h3a9RUSSUItSRCQJtShFRJJQUIqIJKGgFBFJQkEpIpKEglJEJAkFpYhIEv8/Tm7V+9x73o4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig4 = plt.figure(figsize=(5,5))\n",
    "plt.plot(X_range,y_5_range_predict)\n",
    "plt.scatter(X_train,y_train)\n",
    "plt.scatter(X_test,y_test)\n",
    "\n",
    "plt.title('polynomial prediction result (5)')\n",
    "plt.xlabel('temperature')\n",
    "plt.ylabel('rate')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "酶活性预测实战summary：\n",
    "1、通过建立二阶多项式回归模型，对酶活性实现了一个较好的预测，无论针对训练或测试数据都得到一个高的r2分数；\n",
    "2、通过建立线性回归、五阶多项式回归模型，发现存在过拟合或欠拟合情况。过拟合情况下，对于训练数据r2分数高（预测准确），但对于预测数据r2分数低（预测不准确）;\n",
    "3、无论时通过r2分数，或是可视化模型结果，都可以发现二阶多项式回归模型效果最好\n",
    "4、核心算法参考链接：https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html#sklearn.linear_model.LinearRegression"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
